package Jdbc;
import java.sql.*;
public class Work3 {
    public static void main(String[] args) {
        Connection con = DBUtil.getConnection();
        ResultSet rs = null;
        Statement stmt = null;
        try {
            String sql = "show tables";
            stmt = con.createStatement();
            rs = stmt.executeQuery(sql);
            while (rs.next()) {
                String str = rs.getString(1);
                System.out.printf(" %s", str);
            }
        } catch (
                SQLException e) {
            e.printStackTrace();
        } finally {
            DBUtil.close(con, stmt, rs);
        }
    }
}
